package com.beimin.evedata.model.map;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.beimin.evedata.model.chr.ChrFaction;

@Entity
@Table(name = "mapsolarsystems")
public class MapSolarSystem implements java.io.Serializable {
	@Id
	@Column(name = "solarSystemID", unique = true, nullable = false)
	private int solarSystemId;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "factionID")
	private ChrFaction faction;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "regionID")
	private MapRegion region;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "constellationID")
	private MapConstellation constellation;
	@Column(name = "solarSystemName", length = 100)
	private String solarSystemName;
	@Column(name = "x", precision = 22, scale = 0)
	private Double x;
	@Column(name = "y", precision = 22, scale = 0)
	private Double y;
	@Column(name = "z", precision = 22, scale = 0)
	private Double z;
	@Column(name = "xMin", precision = 22, scale = 0)
	private Double xmin;
	@Column(name = "xMax", precision = 22, scale = 0)
	private Double xmax;
	@Column(name = "yMin", precision = 22, scale = 0)
	private Double ymin;
	@Column(name = "yMax", precision = 22, scale = 0)
	private Double ymax;
	@Column(name = "zMin", precision = 22, scale = 0)
	private Double zmin;
	@Column(name = "zMax", precision = 22, scale = 0)
	private Double zmax;
	@Column(name = "luminosity", precision = 22, scale = 0)
	private Double luminosity;
	@Column(name = "border")
	private boolean border;
	@Column(name = "fringe")
	private boolean fringe;
	@Column(name = "corridor")
	private boolean corridor;
	@Column(name = "hub")
	private boolean hub;
	@Column(name = "international")
	private boolean international;
	@Column(name = "regional")
	private boolean regionalBoolean;
	@Column(name = "constellation")
	private boolean constellationBoolean;
	@Column(name = "security", precision = 22, scale = 0)
	private Double security;
	@Column(name = "radius", precision = 22, scale = 0)
	private Double radius;
	@Column(name = "sunTypeID")
	private Integer sunTypeId;
	@Column(name = "securityClass", length = 2)
	private String securityClass;
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "mapsolarsystemsByToSolarSystemId")
	private Set<MapSolarSystemJump> mapsolarsystemjumpsesForToSolarSystemId = new HashSet<MapSolarSystemJump>(0);
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "mapsolarsystemsByFromSolarSystemId")
	private Set<MapSolarSystemJump> mapsolarsystemjumpsesForFromSolarSystemId = new HashSet<MapSolarSystemJump>(0);

	public MapSolarSystem() {
	}

	public MapSolarSystem(int solarSystemId) {
		this.solarSystemId = solarSystemId;
	}

	public MapSolarSystem(int solarSystemId, ChrFaction faction, MapRegion region, MapConstellation constellation, String solarSystemName, Double x, Double y, Double z,
			Double xmin, Double xmax, Double ymin, Double ymax, Double zmin, Double zmax, Double luminosity, boolean border, boolean fringe, boolean corridor,
			boolean hub, boolean international, boolean regionalBoolean, boolean constellationBoolean, Double security, Double radius, Integer sunTypeId,
			String securityClass, Set<MapSolarSystemJump> mapsolarsystemjumpsesForToSolarSystemId, Set<MapSolarSystemJump> mapsolarsystemjumpsesForFromSolarSystemId) {
		this.solarSystemId = solarSystemId;
		this.faction = faction;
		this.region = region;
		this.constellation = constellation;
		this.solarSystemName = solarSystemName;
		this.x = x;
		this.y = y;
		this.z = z;
		this.xmin = xmin;
		this.xmax = xmax;
		this.ymin = ymin;
		this.ymax = ymax;
		this.zmin = zmin;
		this.zmax = zmax;
		this.luminosity = luminosity;
		this.border = border;
		this.fringe = fringe;
		this.corridor = corridor;
		this.hub = hub;
		this.international = international;
		this.regionalBoolean = regionalBoolean;
		this.constellationBoolean = constellationBoolean;
		this.security = security;
		this.radius = radius;
		this.sunTypeId = sunTypeId;
		this.securityClass = securityClass;
		this.mapsolarsystemjumpsesForToSolarSystemId = mapsolarsystemjumpsesForToSolarSystemId;
		this.mapsolarsystemjumpsesForFromSolarSystemId = mapsolarsystemjumpsesForFromSolarSystemId;
	}

	public int getSolarSystemId() {
		return this.solarSystemId;
	}

	public void setSolarSystemId(int solarSystemId) {
		this.solarSystemId = solarSystemId;
	}

	public ChrFaction getFaction() {
		return this.faction;
	}

	public void setFaction(ChrFaction faction) {
		this.faction = faction;
	}

	public MapRegion getRegion() {
		return this.region;
	}

	public void setRegion(MapRegion region) {
		this.region = region;
	}

	public MapConstellation getConstellation() {
		return this.constellation;
	}

	public void setConstellation(MapConstellation constellation) {
		this.constellation = constellation;
	}

	public String getSolarSystemName() {
		return this.solarSystemName;
	}

	public void setSolarSystemName(String solarSystemName) {
		this.solarSystemName = solarSystemName;
	}

	public Double getX() {
		return this.x;
	}

	public void setX(Double x) {
		this.x = x;
	}

	public Double getY() {
		return this.y;
	}

	public void setY(Double y) {
		this.y = y;
	}

	public Double getZ() {
		return this.z;
	}

	public void setZ(Double z) {
		this.z = z;
	}

	public Double getXmin() {
		return this.xmin;
	}

	public void setXmin(Double xmin) {
		this.xmin = xmin;
	}

	public Double getXmax() {
		return this.xmax;
	}

	public void setXmax(Double xmax) {
		this.xmax = xmax;
	}

	public Double getYmin() {
		return this.ymin;
	}

	public void setYmin(Double ymin) {
		this.ymin = ymin;
	}

	public Double getYmax() {
		return this.ymax;
	}

	public void setYmax(Double ymax) {
		this.ymax = ymax;
	}

	public Double getZmin() {
		return this.zmin;
	}

	public void setZmin(Double zmin) {
		this.zmin = zmin;
	}

	public Double getZmax() {
		return this.zmax;
	}

	public void setZmax(Double zmax) {
		this.zmax = zmax;
	}

	public Double getLuminosity() {
		return this.luminosity;
	}

	public void setLuminosity(Double luminosity) {
		this.luminosity = luminosity;
	}

	public boolean isBorder() {
		return this.border;
	}

	public void setBorder(boolean border) {
		this.border = border;
	}

	public boolean isFringe() {
		return this.fringe;
	}

	public void setFringe(boolean fringe) {
		this.fringe = fringe;
	}

	public boolean isCorridor() {
		return this.corridor;
	}

	public void setCorridor(boolean corridor) {
		this.corridor = corridor;
	}

	public boolean isHub() {
		return this.hub;
	}

	public void setHub(boolean hub) {
		this.hub = hub;
	}

	public boolean isInternational() {
		return this.international;
	}

	public void setInternational(boolean international) {
		this.international = international;
	}

	public boolean isRegionalBoolean() {
		return this.regionalBoolean;
	}

	public void setRegionalBoolean(boolean regionalBoolean) {
		this.regionalBoolean = regionalBoolean;
	}

	public boolean isConstellationBoolean() {
		return this.constellationBoolean;
	}

	public void setConstellationBoolean(boolean constellationBoolean) {
		this.constellationBoolean = constellationBoolean;
	}

	public Double getSecurity() {
		return this.security;
	}

	public void setSecurity(Double security) {
		this.security = security;
	}

	public Double getRadius() {
		return this.radius;
	}

	public void setRadius(Double radius) {
		this.radius = radius;
	}

	public Integer getSunTypeId() {
		return this.sunTypeId;
	}

	public void setSunTypeId(Integer sunTypeId) {
		this.sunTypeId = sunTypeId;
	}

	public String getSecurityClass() {
		return this.securityClass;
	}

	public void setSecurityClass(String securityClass) {
		this.securityClass = securityClass;
	}

	public Set<MapSolarSystemJump> getMapsolarsystemjumpsesForToSolarSystemId() {
		return this.mapsolarsystemjumpsesForToSolarSystemId;
	}

	public void setMapsolarsystemjumpsesForToSolarSystemId(Set<MapSolarSystemJump> mapsolarsystemjumpsesForToSolarSystemId) {
		this.mapsolarsystemjumpsesForToSolarSystemId = mapsolarsystemjumpsesForToSolarSystemId;
	}

	public Set<MapSolarSystemJump> getMapsolarsystemjumpsesForFromSolarSystemId() {
		return this.mapsolarsystemjumpsesForFromSolarSystemId;
	}

	public void setMapsolarsystemjumpsesForFromSolarSystemId(Set<MapSolarSystemJump> mapsolarsystemjumpsesForFromSolarSystemId) {
		this.mapsolarsystemjumpsesForFromSolarSystemId = mapsolarsystemjumpsesForFromSolarSystemId;
	}

}
